home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_libjpeg.idb / usr / freeware / catman / u_man / cat1 / cjpeg.Z / cjpeg
Encoding:
Text File  |  1999-01-26  |  15.8 KB  |  331 lines

  1.  
  2.  
  3.  
  4.      CCCCJJJJPPPPEEEEGGGG((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((22220000 MMMMaaaarrrrcccchhhh 1111999999998888))))          CCCCJJJJPPPPEEEEGGGG((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       cjpeg    - compress an image file to a JPEG file
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.       ccccjjjjppppeeeegggg    [ _o_p_t_i_o_n_s ] [ _f_i_l_e_n_a_m_e ]
  13.  
  14.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.       ccccjjjjppppeeeegggg    compresses the named image file, or the    standard input
  16.       if no    file is    named, and produces a JPEG/JFIF    file on    the
  17.       standard output.  The    currently supported input file formats
  18.       are: PPM (PBMPLUS color format), PGM (PBMPLUS    gray-scale
  19.       format), BMP,    Targa, and RLE (Utah Raster Toolkit format).
  20.       (RLE is supported only if the    URT library is available.)
  21.  
  22.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  23.       All switch names may be abbreviated; for example, ----ggggrrrraaaayyyyssssccccaaaalllleeee
  24.       may be written ----ggggrrrraaaayyyy or ----ggggrrrr.    Most of    the "basic" switches
  25.       can be abbreviated to    as little as one letter.  Upper    and
  26.       lower    case are equivalent (thus ----BBBBMMMMPPPP is the same as ----bbbbmmmmpppp).
  27.       British spellings are    also accepted (e.g., ----ggggrrrreeeeyyyyssssccccaaaalllleeee),
  28.       though for brevity these are not mentioned below.
  29.  
  30.       The basic switches are:
  31.  
  32.       ----qqqquuuuaaaalllliiiittttyyyy _N
  33.            Scale quantization tables to adjust image quality.
  34.            Quality is 0 (worst) to 100 (best); default is 75.
  35.            (See below for more info.)
  36.  
  37.       ----ggggrrrraaaayyyyssssccccaaaalllleeee
  38.            Create monochrome JPEG file from    color input.  Be sure
  39.            to use this switch when compressing a grayscale BMP
  40.            file, because ccccjjjjppppeeeegggg isn't bright    enough to notice
  41.            whether a BMP file uses only shades of gray.  By    saying
  42.            ----ggggrrrraaaayyyyssssccccaaaalllleeee, you'll get a    smaller    JPEG file that takes
  43.            less time to process.
  44.  
  45.       ----ooooppppttttiiiimmmmiiiizzzzeeee
  46.            Perform optimization of entropy encoding    parameters.
  47.            Without this, default encoding parameters are used.
  48.            ----ooooppppttttiiiimmmmiiiizzzzeeee usually makes the JPEG    file a little smaller,
  49.            but ccccjjjjppppeeeegggg runs somewhat slower and needs    much more
  50.            memory.    Image quality and speed    of decompression are
  51.            unaffected by ----ooooppppttttiiiimmmmiiiizzzzeeee.
  52.  
  53.       ----pppprrrrooooggggrrrreeeessssssssiiiivvvveeee
  54.            Create progressive JPEG file (see below).
  55.  
  56.       ----ttttaaaarrrrggggaaaa
  57.            Input file is Targa format.  Targa files    that contain
  58.            an "identification" field will not be automatically
  59.            recognized by ccccjjjjppppeeeegggg; for    such files you must specify
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 12/16/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      CCCCJJJJPPPPEEEEGGGG((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((22220000 MMMMaaaarrrrcccchhhh 1111999999998888))))          CCCCJJJJPPPPEEEEGGGG((((1111))))
  71.  
  72.  
  73.  
  74.            ----ttttaaaarrrrggggaaaa to make ccccjjjjppppeeeegggg treat the input as Targa format.
  75.            For most    Targa files, you won't need this switch.
  76.  
  77.       The ----qqqquuuuaaaalllliiiittttyyyy switch lets you trade off compressed file size
  78.       against quality of the reconstructed image: the higher the
  79.       quality setting, the larger the JPEG file, and the closer
  80.       the output image will    be to the original input.  Normally
  81.       you want to use the lowest quality setting (smallest file)
  82.       that decompresses into something visually indistinguishable
  83.       from the original image.  For    this purpose the quality
  84.       setting should be between 50 and 95; the default of 75 is
  85.       often    about right.  If you see defects at ----qqqquuuuaaaalllliiiittttyyyy 75, then
  86.       go up    5 or 10    counts at a time until you are happy with the
  87.       output image.     (The optimal setting will vary    from one image
  88.       to another.)
  89.  
  90.       ----qqqquuuuaaaalllliiiittttyyyy 100 will generate a quantization table of all 1's,
  91.       minimizing loss in the quantization step (but    there is still
  92.       information loss in subsampling, as well as roundoff error).
  93.       This setting is mainly of interest for experimental
  94.       purposes.  Quality values above about    95 are nnnnooootttt recommended
  95.       for normal use; the compressed file size goes    up
  96.       dramatically for hardly any gain in output image quality.
  97.  
  98.       In the other direction, quality values below 50 will produce
  99.       very small files of low image    quality.  Settings around 5 to
  100.       10 might be useful in    preparing an index of a    large image
  101.       library, for example.     Try ----qqqquuuuaaaalllliiiittttyyyy 2    (or so)    for some
  102.       amusing Cubist effects.  (Note: quality values below about
  103.       25 generate 2-byte quantization tables, which    are considered
  104.       optional in the JPEG standard.  ccccjjjjppppeeeegggg    emits a    warning
  105.       message when you give    such a quality value, because some
  106.       other    JPEG programs may be unable to decode the resulting
  107.       file.     Use ----bbbbaaaasssseeeelllliiiinnnneeee if you need to ensure compatibility at
  108.       low quality values.)
  109.  
  110.       The ----pppprrrrooooggggrrrreeeessssssssiiiivvvveeee switch creates a "progressive JPEG" file.
  111.       In this type of JPEG file, the data is stored    in multiple
  112.       scans    of increasing quality.    If the file is being
  113.       transmitted over a slow communications link, the decoder can
  114.       use the first    scan to    display    a low-quality image very
  115.       quickly, and can then    improve    the display with each
  116.       subsequent scan.  The    final image is exactly equivalent to a
  117.       standard JPEG    file of    the same quality setting, and the
  118.       total    file size is about the same ---    often a    little
  119.       smaller.  CCCCaaaauuuuttttiiiioooonnnn:::: progressive JPEG is not yet widely
  120.       implemented, so many decoders    will be    unable to view a
  121.       progressive JPEG file    at all.
  122.  
  123.       Switches for advanced    users:
  124.  
  125.       ----ddddcccctttt iiiinnnntttt
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 12/16/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      CCCCJJJJPPPPEEEEGGGG((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((22220000 MMMMaaaarrrrcccchhhh 1111999999998888))))          CCCCJJJJPPPPEEEEGGGG((((1111))))
  137.  
  138.  
  139.  
  140.            Use integer DCT method (default).
  141.  
  142.       ----ddddcccctttt ffffaaaasssstttt
  143.            Use fast    integer    DCT (less accurate).
  144.  
  145.       ----ddddcccctttt ffffllllooooaaaatttt
  146.            Use floating-point DCT method.  The float method    is
  147.            very slightly more accurate than    the int    method,    but is
  148.            much slower unless your machine has very    fast
  149.            floating-point hardware.     Also note that    results    of the
  150.            floating-point method may vary slightly across
  151.            machines, while the integer methods should give the
  152.            same results everywhere.     The fast integer method is
  153.            much less accurate than the other two.
  154.  
  155.       ----rrrreeeessssttttaaaarrrrtttt _N
  156.            Emit a JPEG restart marker every    N MCU rows, or every N
  157.            MCU blocks if "B" is attached to    the number.  ----rrrreeeessssttttaaaarrrrtttt
  158.            0000 (the default) means no    restart    markers.
  159.  
  160.       ----ssssmmmmooooooootttthhhh _N
  161.            Smooth the input    image to eliminate dithering noise.
  162.            N, ranging from 1 to 100, indicates the strength    of
  163.            smoothing.  0 (the default) means no smoothing.
  164.  
  165.       ----mmmmaaaaxxxxmmmmeeeemmmmoooorrrryyyy _N
  166.            Set limit for amount of memory to use in    processing
  167.            large images.  Value is in thousands of bytes, or
  168.            millions    of bytes if "M"    is attached to the number.
  169.            For example, ----mmmmaaaaxxxx 4444mmmm selects 4000000 bytes.  If more
  170.            space is    needed,    temporary files    will be    used.
  171.  
  172.       ----oooouuuuttttffffiiiilllleeee _n_a_m_e
  173.            Send output image to the    named file, not    to standard
  174.            output.
  175.  
  176.       ----vvvveeeerrrrbbbboooosssseeee
  177.            Enable debug printout.  More ----vvvv's give more output.
  178.            Also, version information is printed at startup.
  179.  
  180.       ----ddddeeeebbbbuuuugggg
  181.            Same as ----vvvveeeerrrrbbbboooosssseeee.
  182.  
  183.       The ----rrrreeeessssttttaaaarrrrtttt option inserts extra markers that allow a JPEG
  184.       decoder to resynchronize after a transmission    error.
  185.       Without restart markers, any damage to a compressed file
  186.       will usually ruin the    image from the point of    the error to
  187.       the end of the image;    with restart markers, the damage is
  188.       usually confined to the portion of the image up to the next
  189.       restart marker.  Of course, the restart markers occupy extra
  190.       space.  We recommend ----rrrreeeessssttttaaaarrrrtttt    1111 for images that will be
  191.       transmitted across unreliable    networks such as Usenet.
  192.  
  193.  
  194.  
  195.      Page 3                        (printed 12/16/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      CCCCJJJJPPPPEEEEGGGG((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((22220000 MMMMaaaarrrrcccchhhh 1111999999998888))))          CCCCJJJJPPPPEEEEGGGG((((1111))))
  203.  
  204.  
  205.  
  206.       The ----ssssmmmmooooooootttthhhh option filters the input to eliminate fine-scale
  207.       noise.  This is often    useful when converting dithered    images
  208.       to JPEG: a moderate smoothing    factor of 10 to    50 gets    rid of
  209.       dithering patterns in    the input file,    resulting in a smaller
  210.       JPEG file and    a better-looking image.     Too large a smoothing
  211.       factor will visibly blur the image, however.
  212.  
  213.       Switches for wizards:
  214.  
  215.       ----bbbbaaaasssseeeelllliiiinnnneeee
  216.            Force baseline-compatible quantization tables to    be
  217.            generated.  This    clamps quantization values to 8    bits
  218.            even at low quality settings.  (This switch is poorly
  219.            named, since it does not    ensure that the    output is
  220.            actually    baseline JPEG.    For example, you can use
  221.            ----bbbbaaaasssseeeelllliiiinnnneeee and ----pppprrrrooooggggrrrreeeessssssssiiiivvvveeee together.)
  222.  
  223.       ----qqqqttttaaaabbbblllleeeessss _f_i_l_e
  224.            Use the quantization tables given in the    specified text
  225.            file.
  226.  
  227.       ----qqqqsssslllloooottttssss _N[,...]
  228.            Select which quantization table to use for each color
  229.            component.
  230.  
  231.       ----ssssaaaammmmpppplllleeee _H_x_V[,...]
  232.            Set JPEG    sampling factors for each color    component.
  233.  
  234.       ----ssssccccaaaannnnssss _f_i_l_e
  235.            Use the scan script given in the    specified text file.
  236.  
  237.       The "wizard" switches    are intended for experimentation with
  238.       JPEG.     If you    don't know what    you are    doing, ddddoooonnnn''''tttt uuuusssseeee tttthhhheeeemmmm.
  239.       These    switches are documented    further    in the file
  240.       wizard.doc.
  241.  
  242.      EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  243.       This example compresses the PPM file foo.ppm with a quality
  244.       factor of 60 and saves the output as foo.jpg:
  245.  
  246.            ccccjjjjppppeeeegggg ----qqqquuuuaaaalllliiiittttyyyy _6_0 _f_o_o._p_p_m >>>> _f_o_o._j_p_g
  247.  
  248.      HHHHIIIINNNNTTTTSSSS
  249.       Color    GIF files are not the ideal input for JPEG; JPEG is
  250.       really intended for compressing full-color (24-bit) images.
  251.       In particular, don't try to convert cartoons,    line drawings,
  252.       and other images that    have only a few    distinct colors.  GIF
  253.       works    great on these,    JPEG does not.    If you want to convert
  254.       a GIF    to JPEG, you should experiment with ccccjjjjppppeeeegggg's ----qqqquuuuaaaalllliiiittttyyyy
  255.       and ----ssssmmmmooooooootttthhhh options to get a satisfactory conversion.
  256.       ----ssssmmmmooooooootttthhhh 11110000 or    so is often helpful.
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                        (printed 12/16/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      CCCCJJJJPPPPEEEEGGGG((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((22220000 MMMMaaaarrrrcccchhhh 1111999999998888))))          CCCCJJJJPPPPEEEEGGGG((((1111))))
  269.  
  270.  
  271.  
  272.       Avoid    running    an image through a series of JPEG
  273.       compression/decompression cycles.  Image quality loss    will
  274.       accumulate; after ten    or so cycles the image may be
  275.       noticeably worse than    it was after one cycle.     It's best to
  276.       use a    lossless format    while manipulating an image, then
  277.       convert to JPEG format when you are ready to file the    image
  278.       away.
  279.  
  280.       The ----ooooppppttttiiiimmmmiiiizzzzeeee    option to ccccjjjjppppeeeegggg    is worth using when you    are
  281.       making a "final" version for posting or archiving.  It's
  282.       also a win when you are using    low quality settings to    make
  283.       very small JPEG files; the percentage    improvement is often a
  284.       lot more than    it is on larger    files.    (At present, ----ooooppppttttiiiimmmmiiiizzzzeeee
  285.       mode is always selected when generating progressive JPEG
  286.       files.)
  287.  
  288.      EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
  289.       JJJJPPPPEEEEGGGGMMMMEEEEMMMM
  290.            If this environment variable is set, its    value is the
  291.            default memory limit.  The value    is specified as
  292.            described for the ----mmmmaaaaxxxxmmmmeeeemmmmoooorrrryyyy switch.  JJJJPPPPEEEEGGGGMMMMEEEEMMMM overrides
  293.            the default value specified when    the program was
  294.            compiled, and itself is overridden by an    explicit
  295.            ----mmmmaaaaxxxxmmmmeeeemmmmoooorrrryyyy.
  296.  
  297.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  298.       ddddjjjjppppeeeegggg(1), jjjjppppeeeeggggttttrrrraaaannnn(1), rrrrddddjjjjppppggggccccoooommmm(1), wwwwrrrrjjjjppppggggccccoooommmm(1)
  299.       ppppppppmmmm(5), ppppggggmmmm(5)
  300.       Wallace, Gregory K.  "The JPEG Still Picture Compression
  301.       Standard", Communications of the ACM,    April 1991 (vol. 34,
  302.       no. 4), pp. 30-44.
  303.  
  304.      AAAAUUUUTTTTHHHHOOOORRRR
  305.       Independent JPEG Group
  306.  
  307.      BBBBUUUUGGGGSSSS
  308.       Arithmetic coding is not supported for legal reasons.
  309.  
  310.       GIF input files are no longer    supported, to avoid the    Unisys
  311.       LZW patent.  Use a Unisys-licensed program if    you need to
  312.       read a GIF file.  (Conversion    of GIF files to    JPEG is
  313.       usually a bad    idea anyway.)
  314.  
  315.       Not all variants of BMP and Targa file formats are
  316.       supported.
  317.  
  318.       The ----ttttaaaarrrrggggaaaa switch is not a bug, it's a feature.  (It would
  319.       be a bug if the Targa    format designers had not been
  320.       clueless.)
  321.  
  322.       Still    not as fast as we'd like.
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                        (printed 12/16/98)
  328.  
  329.  
  330.  
  331.